package com.laamella.syntherface.synths.alesis.micron.gui;

import com.laamella.syntherface.synths.alesis.micron.model.Filters;

@SuppressWarnings("serial") public class Filter2Panel extends javax.swing.JPanel {

    /** Creates new form Filter2Panel */
    public Filter2Panel() {
        initComponents();
    }
	
	public void setModel(Filters filters){
		typeSlider.setModel(filters.filter2Type);
		typeLabel.setModel(filters.filter2Type);
		resonanceSlider.setModel(filters.filter2EnvelopeAmount);
		filterOffsetCheckBox.setModel(filters.filter2Offset.buttonModel);
		frequencyAbsoluteSlider.setModel(filters.filter2FrequencyAbsolute);
		frequencyRelativeSlider.setModel(filters.filter2FrequencyRelative);
		keyTrackingSlider.setModel(filters.filter2KeyTrack);
		resonanceSlider.setModel(filters.filter2Resonance);
	}

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        typeSlider = new javax.swing.JSlider();
        typeLabel = new com.laamella.syntherface.synths.gui.ParameterValueLabel();
        resonanceSlider = new javax.swing.JSlider();
        jLabel2 = new javax.swing.JLabel();
        filterOffsetCheckBox = new javax.swing.JCheckBox();
        envelopeAmountSlider1 = new javax.swing.JSlider();
        frequencyAbsoluteSlider = new javax.swing.JSlider();
        frequencyRelativeSlider = new javax.swing.JSlider();
        keyTrackingSlider = new javax.swing.JSlider();
        jLabel3 = new javax.swing.JLabel();
        frequencyAbsolute = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(204, 153, 255));
        setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 0, 153), 3));
        setLayout(null);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel1.setText("Filter 2");
        add(jLabel1);
        jLabel1.setBounds(10, 10, 80, 22);

        typeSlider.setOpaque(false);
        add(typeSlider);
        typeSlider.setBounds(20, 50, 120, 24);
        add(typeLabel);
        typeLabel.setBounds(10, 40, 103, 14);

        resonanceSlider.setOpaque(false);
        add(resonanceSlider);
        resonanceSlider.setBounds(20, 270, 120, 24);

        jLabel2.setText("resonance");
        add(jLabel2);
        jLabel2.setBounds(10, 260, 110, 14);

        filterOffsetCheckBox.setText("filter offset to filter 1");
        filterOffsetCheckBox.setOpaque(false);
        add(filterOffsetCheckBox);
        filterOffsetCheckBox.setBounds(10, 110, 140, 23);

        envelopeAmountSlider1.setOpaque(false);
        add(envelopeAmountSlider1);
        envelopeAmountSlider1.setBounds(20, 90, 120, 24);

        frequencyAbsoluteSlider.setOpaque(false);
        add(frequencyAbsoluteSlider);
        frequencyAbsoluteSlider.setBounds(20, 150, 120, 24);

        frequencyRelativeSlider.setOpaque(false);
        add(frequencyRelativeSlider);
        frequencyRelativeSlider.setBounds(20, 190, 120, 24);

        keyTrackingSlider.setOpaque(false);
        add(keyTrackingSlider);
        keyTrackingSlider.setBounds(20, 230, 120, 24);

        jLabel3.setText("envelope amount");
        add(jLabel3);
        jLabel3.setBounds(10, 80, 110, 14);

        frequencyAbsolute.setText("frequency absolute");
        add(frequencyAbsolute);
        frequencyAbsolute.setBounds(10, 140, 110, 14);

        jLabel5.setText("frequency relative");
        add(jLabel5);
        jLabel5.setBounds(10, 180, 110, 14);

        jLabel6.setText("key tracking");
        add(jLabel6);
        jLabel6.setBounds(10, 220, 110, 14);
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JSlider envelopeAmountSlider1;
    private javax.swing.JCheckBox filterOffsetCheckBox;
    private javax.swing.JLabel frequencyAbsolute;
    private javax.swing.JSlider frequencyAbsoluteSlider;
    private javax.swing.JSlider frequencyRelativeSlider;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JSlider keyTrackingSlider;
    private javax.swing.JSlider resonanceSlider;
    private com.laamella.syntherface.synths.gui.ParameterValueLabel typeLabel;
    private javax.swing.JSlider typeSlider;
    // End of variables declaration//GEN-END:variables

}
